package com.cysyz.mylib.io.filesavetool.impl;


import com.cysyz.mylib.io.filesavetool.ISaveFileToRemoteTool;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;

public class SaveFileToRemoteToolJersey implements ISaveFileToRemoteTool {

	public void save(byte[] srcFileBytes, String fullTargetPath) {
		// 创建客服端，基于webservice
		Client client = Client.create();
		// 指定资源路径
		WebResource webResource = client.resource(fullTargetPath);
		
		// 使用put的请求方式把资源文件放到资源服务器上
		webResource.put(String.class, srcFileBytes);
	}

}	
